package board;

import java.util.*;

import javax.servlet.http.*;

import model.*;

import org.apache.struts.action.*;
import org.apache.struts.actions.*;

public class CommentAction extends DispatchAction {	

	//자료실 코멘트 불러오기
	public Vector commentList(DataComment dc){
		DataCommentDAO comment = new DataCommentDAO();
		Vector list = comment.getList();
		Vector commentList = new Vector();
		
		for(int i=0; i<list.size();i++){
			DataCommentForm dcf = new DataCommentForm();
			DataComment commentForm = (DataComment)list.elementAt(i);			
			dcf.setMid(commentForm.getMid());
			dcf.setDccomment(commentForm.getDccomment());
			dcf.setDcdate(commentForm.getDcdate().substring(0,11));			
			
			commentList.add(dcf);
		}
		return commentList;
	}
	
	//코멘트 달기
	public ActionForward addComment(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws Exception {				
		
		return null;
	}
	
	//코멘트 수정하기
	public ActionForward modifyComment(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws Exception {	
		
		return null;
	}
	
	//코멘트  삭제하기
	public ActionForward deleteComment(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws Exception {		
		
		return null;
	}

}
